#ifndef SL_ASYNFRAMEPUB_H_20220123_
#define SL_ASYNFRAMEPUB_H_20220123_

#include "SLT_tool_pub_def.h"
#include "SL_asynFrame.h"


//默认框架对象
SLT_API uint32_t SLF_init(int _threadNum);
//uint32_t SLF_uninit(int _threadNum);

SLT_API uint32_t SLF_start();
//uint32_t SLF_stop();

/*
* 添加任务对象
* 执行 OnStart
*/
SLT_API bool SLF_addSession(const SLF_SessionBasePtr &_psession);
SLT_API void SLF_delSession(uint32_t _sessId);

/*
	* 异步接口。向本地指定sessiondi对象发送消息
	* 提示：基本不会失败，只有内存不足的情况下才会失败
*/
SLT_API bool SLF_postMsg(uint32_t _SessID, int _msgid, uint32_t _srcID, const SLF_sendMemBasePtr &_data);
//本地向远端发送消息
SLT_API bool SLF_postMsg2(uint32_t _SessID, int _msgid, uint32_t _srcID, SLF_sendMemBasePtr &_data, const SLF_senderPtr &_senderPtr);
SLT_API bool SLF_postMsg3(uint32_t _SessID, int _msgid, uint32_t _srcID, const char *_data,int _dataLen, const SLF_senderPtr &_senderPtr);
//远端接收消息，发送给本地session
SLT_API bool SLF_pushEvent(uint32_t _SessID, int _msgid, uint32_t _srcID, SLF_sendMemBasePtr _data, const SLF_senderPtr &_senderPtr);

#endif